package com.zusmart.core.condition.support;

import java.lang.annotation.Annotation;

import com.zusmart.base.util.Assert;
import com.zusmart.core.bean.BeanDefinition;
import com.zusmart.core.condition.ConditionFrom;
import com.zusmart.core.condition.ConditionType;
import com.zusmart.core.condition.Conditional;

public class DefaultConditionContext extends AbstractConditionContext {

	private final ConditionFrom conditionFrom;
	private final ConditionType conditionType;

	public DefaultConditionContext(BeanDefinition sourceBeanDefinition, Conditional conditional, Annotation annotation, ConditionFrom conditionFrom, ConditionType conditionType) {
		super(sourceBeanDefinition, conditional, annotation);
		Assert.isNull(conditionFrom, "condition from must not be null");
		Assert.isNull(conditionType, "condition type must not be null");
		this.conditionFrom = conditionFrom;
		this.conditionType = conditionType;
	}

	@Override
	public ConditionFrom getConditionFrom() {
		return this.conditionFrom;
	}

	@Override
	public ConditionType getConditionType() {
		return this.conditionType;
	}
	
}